package service;

import pojo.Note;
import pojo.Page;
import pojo.User;

import java.sql.SQLException;

public interface PageService {
    /**
     * 获取首页分页对象
     *
     * @param currentPage1
     * @param rows1
     * @param start
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    Page<Note> findPageNote(Integer currentPage1, Integer rows1, int start) throws SQLException, ClassNotFoundException;

    /**
     * 获取区域分页对象
     *
     * @param type
     * @param currentPage1
     * @param rows1
     * @param start
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    Page<Note> findAreaPageNote(String type, Integer currentPage1, Integer rows1, int start) throws SQLException, ClassNotFoundException;

    /**
     * 获取个人笔记分页对象
     *
     * @param usename
     * @param currentPage1
     * @param rows1
     * @param start
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    Page<Note> findUserPageNote(String usename, Integer currentPage1, Integer rows1, int start) throws SQLException, ClassNotFoundException;

    /**
     * 获取个人未审核通过的笔记分页对象
     *
     * @param usename
     * @param currentPage1
     * @param rows1
     * @param start
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    Page<Note> findUserCheckedPageNote(String usename, Integer currentPage1, Integer rows1, int start) throws SQLException, ClassNotFoundException;

    /**
     * 获取区域未审核通过的笔记分页对象
     *
     * @param type
     * @param currentPage1
     * @param rows1
     * @param start
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    Page<Note> findAreaCheckedPageNote(String type, Integer currentPage1, Integer rows1, int start) throws SQLException, ClassNotFoundException;

    /**
     * 获取区域用户分页对象
     *
     * @param type
     * @param currentPage1
     * @param rows1
     * @param start
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    Page<User> findAreaUserPage(String type, Integer currentPage1, Integer rows1, int start) throws SQLException, ClassNotFoundException;

    /**
     * 获取搜索后分页对象
     *
     * @param currentPage1
     * @param rows1
     * @param content
     * @param start
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    Page<Note> afterSearchPage(Integer currentPage1, Integer rows1, String content, int start) throws SQLException, ClassNotFoundException;

    /**
     * 获取精确搜索后分页对象
     *
     * @param currentPage1
     * @param rows1
     * @param labelSearch
     * @param start
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    Page<Note> afterExatSearchPage(Integer currentPage1, Integer rows1, String labelSearch, int start) throws SQLException, ClassNotFoundException;

}
